package com.lzit.smart_canteen.domain;

import jakarta.persistence.Entity;
import jakarta.persistence.Id;

import java.math.BigDecimal;
import java.util.Date;

/*
t_order(
	`oid` varchar(60) primary key unique,
	`uid` int,
	`status` varchar(30),
	`time` datetime,
    `price` decimal(11,2)
)
 */

@Entity(name = "t_order")
public class Order {
    @Id
    private String  oid;
    private Integer uid;
    private String status;
    private Date time;
    private BigDecimal price;

    public String getOid() {
        return oid;
    }

    public void setOid(String oid) {
        this.oid = oid;
    }

    public Integer getUid() {
        return uid;
    }

    public void setUid(Integer uid) {
        this.uid = uid;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Date getTime() {
        return time;
    }

    public void setTime(Date time) {
        this.time = time;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    @Override
    public String toString() {
        return "Order{" +
                "oid='" + oid + '\'' +
                ", uid=" + uid +
                ", status='" + status + '\'' +
                ", time=" + time +
                ", price=" + price +
                '}';
    }
}
